//
// Created by DELL on 2021/3/20.
//

#ifndef SYLAR_HTTP_SESSION_H
#define SYLAR_HTTP_SESSION_H

#include "stream/socket_stream.h"
#include "http/http.h"

namespace sylar {
    namespace http {
        class HttpSession : public SocketStream {
        public:
            using ptr = std::shared_ptr<HttpSession>;

            HttpSession(Socket::ptr socket,bool owner = true);

            HttpRequest::ptr recvRequest();

            int sendResponse(HttpResponse::ptr rsp);
        };
    }
}
#endif //SYLAR_HTTP_SESSION_H
